<?php

class Application_Form_AddSpec extends Zend_Form {

    public function init(){
            // Set the method for the display form to POST
        $this->setMethod('post');
 
        // spec_category element
        $this->addElement('text', 'spec_category', array(
            'label'      => 'Categorie:',
            'required'   => true,
            'filters'    => array('StringTrim'),
            'validators' => array(
            	array('StringLength', false, array(0, 50)),
            )
        ));
        
        // spec_name element
        $this->addElement('text', 'spec_name', array(
        		'label' => 'Nume:',
        		'filters'    => array('StringTrim'),
        		'required' => true,
        		'validators' => array(
        				array('StringLength', false, array(0, 50)),
        		)
        ));
        
        // spec_value element
        $this->addElement('text', 'spec_value', array(
            'label' => 'Valoare:',
        	'filters'    => array('StringTrim'),
            'required' => true,
        	'validators' => array(
        			array('StringLength', false, array(0, 50)),
        	)
        ));
          
        // Add the submit button
        $this->addElement('submit', 'submit', array(
            'ignore'   => true,
            'label'    => 'Adauga Specificatie',
        ));
    }
}

